import React,{useEffect,useState} from 'react'
import { Input, Button, message, Form } from 'antd';
import {NavLink} from 'umi'
import './setting.less'
// import Settings from '../../components/setting/setting'
import {SettingType,Props} from '../../components/types/setting'
import { postSetting } from '@/api/setting';
// import setting from '../../components/setting/setting';
1111
1111
//系统设置

function Setting({data}:Props){
  useEffect(()=>{
    form.setFieldsValue({...data})
  },[data])

  const [form] =Form.useForm()
  // const onFinish=(value:SettingType)=>{
  //   postSettingData('/setting',values).then(res=>{
  //     message.success('保存成功')
  //   })
  }

  // return <div className='setting'>
     {/* <Form
      name="basic"
      labelCol={{ span: 8 }}
      wrapperCol={{ span: 16 }}
      initialValues={{ remember: true }}
      onFinish={onFinish}
      onFinishFailed={onFinishFailed}
      autoComplete="off"
    >
      <Form.Item
        label="Username"
        name="username"
        rules={[{ required: true, message: 'Please input your username!' }]}
      >
        <Input />
      </Form.Item> */}
  // </div>

// }
export default Setting

{/* // export default function IndexPage() {
  return (
    <div>
      <h1>系统设置</h1>
    </div>
  );
} */}

